{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
    <style>
        .form-signin {
            width: 100%;
            max-width: 420px;
            padding: 15px;
            margin: auto;
        }

        .form-label-group {
            position: relative;
            margin-bottom: 1rem;
        }

        .form-control {
            display: block;
            width: 100%;
            height: calc(1.5em + .75rem + 2px);
            padding: .375rem .75rem;
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
            color: #495057;
            background-color: #fff;
            background-clip: padding-box;
            border: 1px solid #ced4da;
            border-radius: .25rem;
            transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
        }

        .form-label-group > input, .form-label-group > label {
            height: 3.125rem;
            padding: .75rem;
        }

        button, input {
            overflow: visible;
        }

        button, input, optgroup, select, textarea {
            margin: 0;
            font-family: inherit;
            font-size: inherit;
            line-height: inherit;
        }

        .form-label-group > label {
            position: absolute;
            top: 0;
            left: 0;
            display: block;
            width: 100%;
            margin-bottom: 0;
            line-height: 1.5;
            color: #495057;
            pointer-events: none;
            cursor: text;
            border: 1px solid transparent;
            border-radius: .25rem;
            transition: all .1s ease-in-out;
        }

        .form-label-group input:not(:placeholder-shown) ~ label {
            padding-top: .25rem;
            padding-bottom: .25rem;
            font-size: 12px;
            color: #777;
        }

        label {
            display: inline-block;
            margin-bottom: .5rem;
        }
    </style>
</head>
<body style="background-image: url('{% static 'login/image/bg3.jpg'%}'); background-size: cover">
    <form class="form-signin" style="margin-top: 100px" action="/login/" method="post">
        {% csrf_token %}
        <div class="text-center mb-4">
            <img class="mb-4" src="{% static 'login/image/logo.png' %}" alt="" style="height: 72px">
            <h1 class="h3 mb-3 font-weight-normal">开启向往的旅行吧！</h1>
        </div>
        {% if message %}
            <div class="alert alert-warning">{{ message }}</div>
        {% endif %}
        <div class="form-label-group">
            <input type="text" id="id_username" name="username" class="form-control" placeholder="Username" required autofocus>
            <label for="id_username">Username</label>
        </div>

        <div class="form-label-group">
            <input type="password" id="id_password" name="password" class="form-control" placeholder="Password" required>
            <label for="id_password">Password</label>
        </div>

        <div class="mb-3">
            <a href="/register/">注册新用户</a>
        </div>

        <button class="btn btn-lg btn-primary btn-block" type="submit">登&nbsp&nbsp&nbsp录</button>
        <p class="mt-5 mb-3 text-muted text-center">© 2019-2020</p>
    </form>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>